NativeCameraOutput

A CameraOutput backed by an AVCaptureOutput (photo, video, frames...), that is added to the AVCaptureSession and manually connected to its input in CameraSession.configure.

This is an extension point for plugin modules: a module (e.g. barcode) adds its own output to a CameraSession by implementing NativeCameraOutput, and the session connects its output like the built-in outputs'.

Properties

Link copied to clipboard
abstract val currentResolution: Size?

The resolution this output is currently streaming at, or null if it is not connected yet.

Link copied to clipboard
abstract val mediaType: MediaType

The MediaType of this output.

Link copied to clipboard
abstract val output: AVCaptureOutput

The actual AVCaptureOutput that should be added to the AVCaptureSession.

Link copied to clipboard

The orientation of the content produced by this output.

Link copied to clipboard

Whether this output requires an audio input attached to its output. If true, both the camera input and an audio input will be connected to the output.

Link copied to clipboard

Whether this output requires a depth format to be enabled via AVCaptureDevice.activeDepthDataFormat.

Link copied to clipboard
abstract val streamType: StreamType

The stream type the targetResolution specifies.

Link copied to clipboard

The target resolution of this output, negotiated with other outputs and ResolutionBiasConstraints.

Functions

Link copied to clipboard
open override fun close()

Same as dispose, to use a CameraOutput with use { }.

Link copied to clipboard
abstract fun configure(config: OutputConfiguration)

Called whenever the OutputConfiguration might change, in a beginConfiguration()/commitConfiguration() batch. The output is expected to apply all configs such as orientation or mirroring settings in here.

Link copied to clipboard
abstract fun dispose()

Eagerly disposes the native resources this output holds (its threads, analyzers, delegates, sounds...), like VisionCamera's HybridObject.dispose().